package org.udr.datamodel;


public class Attribute {

	private final String name;
	private final Entity owner;

	public Attribute(Entity owner, String name) {
		this.owner = owner;
		this.name = name;
	}

	public String getName() {
		return name;
	}

	/**
	 * Constructs a <code>String</code> with all attributes
	 * in name = value format.
	 *
	 * @return a <code>String</code> representation 
	 * of this object.
	 */
	public String toString()
	{
	    final String TAB = "    ";
	    
	    StringBuffer retValue = new StringBuffer();
	    
	    retValue.append("Attribute ( ")
	        .append(super.toString()).append(TAB)
	        .append("name = ").append(this.name).append(TAB)
	        .append(" )");
	    
	    return retValue.toString();
	}

	public Entity getOwner() {
		return owner;
	}

}
